<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>原生拖拖拽排序</title>
  <style>
    * {
      padding: 0;
      margin: 0;
      box-sizing: border-box;
    }
    ul,ol,li {
      list-style: none;
    }
    body {
      display: flex;
    }
    .list {
      padding: 0 2em;
      width: 80%;
      margin-top: 2em;
    }
    .list-item {
      margin-top: 4px;
      padding: 12px 24px;
      background: pink;
      border-radius: 5px;
      cursor: move;
      user-select: none;
    }
    .list-item.moving {
      background: transparent;
      color: transparent;
      border: 1px dashed #ccc;
    }
  </style>
</head>
<body>
  <div class="list">
    <li class="list-item" draggable="true">1</li>
    <li class="list-item" draggable="true">2</li>
    <li class="list-item" draggable="true">3</li>
    <li class="list-item" draggable="true">4</li>
    <li class="list-item" draggable="true">5</li>
    <li class="list-item" draggable="true">6</li>
  </div>
  <script src="./flip.js"></script>
  <script src="./index.js"></script>
</body>
</html>